#-*-coding:utf-8-*-
import hou
class DesktopsAndToolbars(object):
    def __init__(self):
        super(DesktopsAndToolbars,self).__init__()


    def setSaveDesktopsAutomtically(self,bool):
        if bool == True:
            hou.setPreference('resmgr.autosave.desk.val','1')
            #print('1')
        else:
            hou.setPreference('resmgr.autosave.desk.val','0')
            #print('0')

    def getSaveDesktopsAutomtically(self):
        return hou.getPreference('resmgr.autosave.desk.val')
        #print('getSaveDesktopsAutomtically')


    def setShowHiddenFiles(self,bool):
        if bool == True:
            hou.setPreference('resmgr.showhidden.val','1')
            # print('1')
        else:
            hou.setPreference('resmgr.showhidden.val','0')
            # print('0')


    def getShowHiddenFiles(self):
        return hou.getPreference('resmgr.showhidden.val')
        # print('getShowHiddenFiles')


    def setShowAllFiles(self,bool):
        if bool == True:
            hou.setPreference('resmgr.showall.val','1')
            # print('1')
        else:
            hou.setPreference('resmgr.showall.val','0')
            # print('0')


    def getShowAllFiles(self):
        return hou.getPreference('resmgr.showall.val')
        # print('getShowAllFiles')


    def setPathMenuBehaviour(self,behaviourNum):
        '''
        :param behaviourNum: 0 - Prompt User Each Time, 1 - Copy Files,
        2 - Move Files
        :return:
        '''
        hou.setPreference('resmgr.pathbehaviour.val', str(behaviourNum))
        # print('setPathMenuBehaviour')

    def getPathMenuBehaviour(self):
        return hou.getPreference('resmgr.pathbehaviour.val')
        # print('getPathMenuBehaviour')
